﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Security.Permissions;

namespace Kangjin.Web.UI.Controls.RepeaterEx
{
    [ToolboxItem(false)]
    public class RepeaterItemEx : RepeaterItem
    {
        private int _totalCnt;
        public bool IsFirst
        {
            get
            {
                return this.ItemIndex == 0;
            }
        }
        public bool IsLast
        {
            get
            {
                return this.ItemIndex == _totalCnt - 1;
            }
        }
        public int TotalCount
        {
            get{
                return _totalCnt;
            }
        }

        public RepeaterItemEx(int itemIndex, ListItemType itemType, int totalCnt)
            : base(itemIndex, itemType)
        {
            _totalCnt = totalCnt;
        }
    }
}